using System;
using System.Collections.Generic;
using System.Text;
using FluentNHibernate.Mapping;
using NH_Entity;

namespace NH_Map
{


    public class QHY_ModuleTypeMap : ClassMap<QHY_ModuleType>
    {

        public QHY_ModuleTypeMap()
        {
            Table("QHY_ModuleType");
            LazyLoad();
            Id(x => x.ModuleTypeID).GeneratedBy.Identity().Column("ModuleTypeID");
            Map(x => x.ModuleTypeName).Column("ModuleTypeName").Not.Nullable().Length(30);
            Map(x => x.ModuleTypeOrder).Column("ModuleTypeOrder").Not.Nullable();
            Map(x => x.ModuleTypeDescription).Column("ModuleTypeDescription").Length(50);
            Map(x => x.ModuleTypeDepth).Column("ModuleTypeDepth").Not.Nullable();
            Map(x => x.ModuleTypeSuperiorID).Column("ModuleTypeSuperiorID").Not.Nullable();
            Map(x => x.ModuleTypeCount).Column("ModuleTypeCount").Not.Nullable();
            HasMany(x => x.QHY_Modules).KeyColumn("ModuleTypeID");
        }
    }
}
